<template>
	<view class="wrap">
		<rich-text :nodes="content"></rich-text>
	</view>
</template>

<script>
	import { getProtoCol } from '@/api/protocol'
	export default {
		data(){
			return{
				content:'',
				xyId:-1
			}
		},
		onLoad(options){
			this.xyId = options.xyId;
			this.loadProtocol();
		},
		methods:{
			loadProtocol(){
				uni.showLoading({
					title:'加载中...',
					mask:true
				}) 
				var field = { id:this.xyId };
				getProtoCol(field).then(res=>{
					uni.setNavigationBarTitle({
						title:res.data.datas.title
					})
					this.content = res.data.datas.content;
				}).catch(err=>{
					console.log(err)
				});
			}
		}
	}
</script>

<style scoped lang="scss">
	.wrap{
		padding: 15rpx 30rpx;
	}
</style>